package com.ntv.persistent.news.sql.impl;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.ntv.domain.INews;
import com.ntv.domain.News;

public class FlashNewsMapper implements RowMapper 
{
	public Object mapRow(ResultSet rs, int rowNum) throws SQLException 
	{
		INews news  = new News();
		news.setId(rs.getLong("news_id"));
		news.setCompleteNews(rs.getString("description"));
		news.setLocation(rs.getString("location"));
		news.setHeadLine(rs.getString("head_line"));
		news.setCompleteNews(rs.getString("description"));
		news.setCreatedOn(rs.getDate("date_of_creation"));
		return news;
	}	
}